const HtmlWebpackPlugin=require("html-webpack-plugin");
const {VueLoaderPlugin}=require("vue-loader")
module.exports={
    entry:"./src/index.js",
    module:{
        rules:[
            {
                test:/\.vue$/,
                use:["vue-loader"]
            },
            {
                test:/\.css$/,
                use:["style-loader","css-loader"]
            },
            {
                test:/\.scss$/,
                use:["style-loader","css-loader","sass-loader"]
            }
        ]
    },
    devServer:{
        open:true,
        host:"0.0.0.0",//允许任何ip地址访问
        port:3000
    },
    plugins:[
        new HtmlWebpackPlugin({
            template:"./public/index.html"
        }),
        new VueLoaderPlugin()
    ]
}